package edu.rit.drh4818.raytracing.object;

import edu.rit.drh4818.raytracing.util.Intersection;
import edu.rit.drh4818.raytracing.util.Ray;


/**
 * An object which interferes with ray transmission.
 *  An object in a raytracing system is defined by the way it 
 *  interferes with rays that are traveling through the scene.
 * 
 * @author Darren Headrick
 *
 */
public abstract class SceneObject 
{
	public final ObjectProperties prop;
	
	/**
	 * Create a new object and attach a shader.
	 * @param prop properties.
	 */
	public SceneObject( ObjectProperties prop )
	{
		this.prop = prop;
	}
	
	/**
	 * Test to see if this object intersects the ray.
	 * 
	 * @param ray Ray to test for intersection.
	 * @return The t value at which intersection occurs.
	 */
	public abstract Intersection getIntersection( Ray ray );
	
	/**
	 * Get the normal at an intersection with the object.
	 * @param in Intersection.
	 * @return 
	 */
	public abstract Ray getNormal( Intersection in );
	
}
